package com.abe.bathsystem.base;

import android.os.Bundle;
import android.util.DisplayMetrics;

import com.abe.bathsystem.utils.ConstantBath;
import com.abe.libcore.core.screen.BaseActivity;
import com.abe.libcore.utils.normal.CommonUtils;

import net.yet.campusdev.R;

public abstract class AutoActivity extends BaseActivity {

    @Override
    protected boolean isNeedClickEffect() {
        return true;
    }

    @Override
    protected boolean isNeedAutoLayout() {
        return true;
    }

    @Override
    protected float getDesignWidth() {
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        float width = displayMetrics.widthPixels;
        int DesignWidth = CommonUtils.getMetaIntData(getThisContext(), ConstantBath.META_DATA_DESIGN_WIDTH);
        if (DesignWidth == 0) return width;
        return DesignWidth;
    }

    @Override
    public void CloseActivity() {
        super.CloseActivity();
        overridePendingTransition(R.anim.fade, R.anim.hold);
    }

    @Override
    public void CloseActivityForResult(Bundle bundle) {
        super.CloseActivityForResult(bundle);
        overridePendingTransition(R.anim.fade, R.anim.hold);
    }
}
